      SUBROUTINE SETUP
      RETURN
      END
C   HS66
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),A(3),FX
      SAVE A
      DATA A/-.8D0,  0.0D0,.2D0    /
      ICF=ICF+1
      FX=A(1)*X(1)+A(2)*X(2)+A(3)*X(3)
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADF(NX),A(3)
      SAVE A
      DATA A/-.8D0,  0.0D0,.2D0    /
      ICGF=ICGF+1
      DO     100     I=1,3
      GRADF(I)=A(I)
  100 CONTINUE
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GXI
      IF ( GUNIT(1,I+NH) .EQ. -1 )CRES(I+NH)=CRES(I+NH)+1      
      IF(I - 2)     100,200,300
  100 CONTINUE
       GXI=X(2)-DEXP(X(1))
       RETURN
  200 CONTINUE
       GXI=X(3)-DEXP(X(2))
      RETURN
  300 CONTINUE
      IF(I .LE. 5)       GXI=X(I-2)
      IF(I .GT. 5)       GXI=1.D2-  X(I-5)
      RETURN
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,K
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      IF ( GUNIT(1,I+NH) .EQ. 1 )RETURN
      CGRES(I+NH)=CGRES(I+NH)+1
      IF( I -2 )         100, 200,300
  100 CONTINUE
      GRADGI(1)=-DEXP(X(1))
      GRADGI(2)=1.D0
      GRADGI(3)=0.D0
      RETURN
  200 CONTINUE
      GRADGI(1)=0.D0
      GRADGI(2)=-DEXP(X(2))
      GRADGI(3)=1.D0
      RETURN
  300 CONTINUE
      DO      400      K=1,3
      GRADGI(K)=0.D0
  400 CONTINUE
      IF(I .LE. 5)   GRADGI(I-2)=1.D0
      IF(I .GT. 5)   GRADGI(I-5)=-1.D0
      RETURN
      END
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS66'/
      DATA (X(I),I=1,3)/ 0.0D0,1.05D0,2.9D0/
      DATA N/3/ , NH/0/ , NG/ 8/
      DATA DEL0/1.00D0/ ,TAU0/1.D0/ ,TAU/.1D0/
      DATA ((GUNIT(I,J),I=1,3),J=0,8)/-1,0,0,-1,0,0,-1,0,0,
     F           1,1,1,1,2,1,1,3,1,1,1,-1,1,2,-1,1,3,-1/
      END
